export default [
  //home
  {
    path: '/',
    name: 'home',
    alias: '/home',
    component: () => import('@/pages/home.vue'),
    meta: {
      title: 'home'
    },
    children: [
      { path: 'index', name: 'index', component: () => import('@/pages/index.vue') },
      { path: 'product/:id', name: 'product', component: () => import('@/pages/product.vue') },
      { path: 'detail/:id', name: 'detail', component: () => import('@/pages/detail.vue') },
    ],
    redirect: '/index'
  },
  //order
  {
    path: '/order',
    name: 'order',
    component: () => import('@/pages/order.vue'),
    meta: {
      title: 'order'
    },
    children: [
      { path: 'list', name: 'order-list', component: () => import('@/pages/orderList.vue') },
      { path: 'pay', name: 'order-pay', component: () => import('@/pages/orderPay.vue') },
      { path: 'confirm', name: 'order-confirm', component: () => import('@/pages/orderConfirm.vue') },
      { path: 'alipay', name: 'alipay', component: () => import('@/pages/alipay.vue') },
    ]
  },
  //cart
  {
    path: '/cart',
    name: 'cart',
    component: () => import('@/pages/cart.vue')
  }

]
